package com.example.emvoider.presenter;

import android.util.Log;

import com.example.emvoider.base.BasePresenter;
import com.example.emvoider.bean.NaviBean;
import com.example.emvoider.model.MainModel;
import com.example.emvoider.net.ResultCallBack;
import com.example.emvoider.view.MainView;

/**
 * Created by 阿炜啊 on 2020/7/10.
 */

public class MainPresenter  extends BasePresenter<MainView> {

    private MainModel mMainModel;

    public void getData() {
        mMainModel.getData(new ResultCallBack<NaviBean>() {
            @Override
            public void onSuccess(NaviBean bean) {
                mView.setDataa(bean);
            }
            @Override
            public void onFail(String msg) {
                Log.d("tag", "onFail: "+msg);
        }
        });
    }


    @Override
    public void initModel() {
        mMainModel = new MainModel();
        addModel(mMainModel);
    }
}
